﻿@model JuniorProject.Models.Employee.EmployeeJobToQuestionModel

@{
    ViewBag.Title = "MapQuestionsToJob";
}

@section scripts
{
    <link href="@Url.Content("~/Content/themes/base/jquery-tablesorter.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.tablesorter.js")" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $('table').tablesorter({ headers: { 2: { sorter: false} }, sortList: [[0, 0]] });
        });
    </script>
}

<h2>View Job Questions - Job ID #@Model.JobID</h2>
<br />

@Html.ActionLink("Edit Questions", "MapQuestionsToJob", new { jobID = Model.JobID, newJob = false })<br />
<table id="table" class="tablesorter">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.Questions[0].QuestionID)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Questions[0].Question)
            </th>
        </tr>
    </thead>
    <tbody>
@foreach (var item in Model.Questions)
{
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.QuestionID)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Question)
        </td>
    </tr>
}
    </tbody>
</table>

<p>
    @Html.ActionLink("Edit Questions", "MapQuestionsToJob", new { jobID = Model.JobID, newJob = false })<br />
    @Html.ActionLink("Back to List", "JobList")
</p>

<p>
    @Html.Partial("_EmployeeBottomNavBar", ViewData["AccessLevel"])
</p>